<b-button type="primary">
  Open Modal
</b-button>
<b-modal title="I am a Modal~">
  <div>Some contents...</div>
  <div>Some contents...</div>
  <div>Some contents...</div>
</b-modal>

<script>
  const button = document.querySelector('b-button');
  const modal = document.querySelector('b-modal');

  button.addEventListener('click', () => {
    modal.open = true;
  });

  modal.addEventListener('ok', () => {
    modal.open = false;
    window.BMessage.success({ content: "OK~" })
  });

  modal.addEventListener('cancel', () => {
    modal.open = false;
  });
</script>